<form class="autoform" id="payment" method="post">
    <div class="creditcard_form_header">
        <h3 class="creditcard_info_top_left">Delivery information</h3>
        <h3 class="creditcard_info_top_right">Card information</h3>
        <div class="clear"></div>
    </div>
       <div class="creditcard_left_table">
           <div class="creditcard_left_left">
               <label for="payment-customerCustomer"><span class="creditcard_field_name">Full name</span></label>
               <label for="payment-customerEmail"><span class="creditcard_field_name">Email</span></label>
               <label for="payment-customerAddress"><span class="creditcard_field_name">Address</span></label>
               <label for="payment-customerCity"><span class="creditcard_field_name">City</span></label>
               <label for="payment-customerState"><span class="creditcard_field_name">State</span></label>
               <label for="payment-customerZip"><span class="creditcard_field_name">ZIP-code</span></label>
               <label for="payment-customerPhone"><span class="creditcard_field_name">Phone</span></label>
               <label for="payment-customerComment"><span class="creditcard_field_name">Comment</span></label>
           </div>
           <div class="creditcard_left_right">
               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerCustomer" value="<?=isset($form->elements['customerCustomer']->value)?$form->elements['customerCustomer']->value:''?>" name="payment[customerCustomer]"/>
                    <?=isset($form->elements['customerCustomer']->errors[0])? "<span class='form_error'>".$form->elements['customerCustomer']->errors['0'] ."</span>" :''?>
               </div>



               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerEmail" value="<?=isset($form->elements['customerEmail']->value)?$form->elements['customerEmail']->value:''?>" name="payment[customerEmail]"/>
                    <?=isset($form->elements['customerEmail']->errors[0])? "<span class='form_error'>".$form->elements['customerEmail']->errors['0'] ."</span>" :''?>
               </div>


               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerAddress" value="<?=isset($form->elements['customerAddress']->value)?$form->elements['customerAddress']->value:''?>" name="payment[customerAddress]"/>
                    <?=isset($form->elements['customerAddress']->errors[0])? "<span class='form_error'>".$form->elements['customerAddress']->errors['0'] ."</span>" :''?>
               </div>


               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerCity" value="<?=isset($form->elements['customerCity']->value)?$form->elements['customerCity']->value:''?>" name="payment[customerCity]"/>
                    <?=isset($form->elements['customerCity']->errors[0])? "<span class='form_error'>".$form->elements['customerCity']->errors['0'] ."</span>" :''?>
               </div>



               <div class="creditcard_textbox">
                <select class="contact_input_text" id="payment-customerState" name="payment[customerState]">
                    <option selected="selected" value="AL">Alabama</option>
                    <option value="AK">Alaska</option>
                    <option value="AS">American Samoa</option>
                    <option value="AZ">Arizona</option>
                    <option value="AR">Arkansas</option>
                    <option value="CA">California</option>
                    <option value="CO">Colorado</option>
                    <option value="CT">Connecticut</option>
                    <option value="DE">Delaware</option>
                    <option value="DC">District of Columbia</option>
                    <option value="FM">Federated States of Micronesia</option>
                    <option value="FL">Florida</option>
                    <option value="GA">Georgia</option>
                    <option value="GU">Guam</option>
                    <option value="HI">Hawaii</option>
                    <option value="ID">Idaho</option>
                    <option value="IL">Illinois</option>
                    <option value="IN">Indiana</option>
                    <option value="IA">Iowa</option>
                    <option value="KS">Kansas</option>
                    <option value="KY">Kentucky</option>
                    <option value="LA">Louisiana</option>
                    <option value="ME">Maine</option>
                    <option value="MH">Marshall Islands</option>
                    <option value="MD">Maryland</option>
                    <option value="MA">Massachusetts</option>
                    <option value="MI">Michigan</option>
                    <option value="MN">Minnesota</option>
                    <option value="MS">Mississippi</option>
                    <option value="MO">Missouri</option>
                    <option value="MT">Montana</option>
                    <option value="NE">Nebraska</option>
                    <option value="NV">Nevada</option>
                    <option value="NH">New Hampshire</option>
                    <option value="NJ">New Jersey</option>
                    <option value="NM">New Mexico</option>
                    <option value="NY">New York</option>
                    <option value="NC">North Carolina</option>
                    <option value="ND">North Dakota</option>
                    <option value="MP">Northern Mariana Islands</option>
                    <option value="OH">Ohio</option>
                    <option value="OK">Oklahoma</option>
                    <option value="OR">Oregon</option>
                    <option value="PW">Palau</option>
                    <option value="PA">Pennsylvania</option>
                    <option value="PR">Puerto Rico</option>
                    <option value="RI">Rhode Island</option>
                    <option value="SC">South Carolina</option>
                    <option value="SD">South Dakota</option>
                    <option value="TN">Tennessee</option>
                    <option value="TX">Texas</option>
                    <option value="UT">Utah</option>
                    <option value="VT">Vermont</option>
                    <option value="VI">Virgin Islands</option>
                    <option value="VA">Virginia</option>
                    <option value="WA">Washington</option>
                    <option value="WV">West Virginia</option>
                    <option value="WI">Wisconsin</option>
                    <option value="WY">Wyoming</option>
                </select>
                   <?=isset($form->elements['customerState']->errors[0])? "<span class='form_error'>".$form->elements['customerState']->errors['0'] ."</span>" :''?>
               </div>




               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerZip" value="<?=isset($form->elements['customerZip']->value)?$form->elements['customerZip']->value:''?>" name="payment[customerZip]"/>
                    <?=isset($form->elements['customerZip']->errors[0])? "<span class='form_error'>".$form->elements['customerZip']->errors['0'] ."</span>" :''?>
               </div>



               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-customerPhone" value="<?=isset($form->elements['customerPhone']->value)?$form->elements['customerPhone']->value:''?>" name="payment[customerPhone]"/>
                    <?=isset($form->elements['customerPhone']->errors[0])? "<span class='form_error'>".$form->elements['customerPhone']->errors['0'] ."</span>" :''?>
               </div>




               <div class="creditcard_textarea">
                    <textarea  rows="10" cols="25" id="payment-customerComment" name="payment[customerComment]"><?=isset($form->elements['customerComment']->value)?$form->elements['customerComment']->value:''?></textarea>
                    <?=isset($form->elements['customerComment']->errors[0])? "<span class='form_error'>".$form->elements['customerComment']->errors['0'] ."</span>" :''?>
               </div>

           </div>

       </div> 
       <!--end of left part-->

       <div class="creditcard_right_table">
           <div class="creditcard_right_left">
               <label for="payment-cardType"><span class="creditcard_field_name">Card type</span></label>
               <label for="payment-acct"><span class="creditcard_field_name">Card number</span></label>
               <label for="payment-firstName"><span class="creditcard_field_name">First name</span></label>
               <label for="payment-lastName"><span class="creditcard_field_name">Last name</span></label>
               <label for="payment-expMonth"><span class="creditcard_field_name">Exp. month</span></label>
               <label for="payment-expYear"><span class="creditcard_field_name">Exp. year</span></label>
               <label for="payment-cvv2"><span class="creditcard_field_name">CSC</span></label>
               <label for="payment-street"><span class="creditcard_field_name creditcard_field_street">Address</span></label>
               <label for="payment-city"><span class="creditcard_field_name">City</span></label>
               <label for="payment-state"><span class="creditcard_field_name">State</span></label>
               <label for="payment-zip"><span class="creditcard_field_name">ZIP-code</span></label>
           </div>
           <div class="creditcard_right_right">
                <div class="creditcard_textbox">
                    <select class="contact_input_text" id="payment-cardType" name="payment[creditCardType]">
                        <option selected="selected" value="visa">VISA</option>
                        <option value="mastercard">Mastercard</option>
                        <option value="discover">Discover</option>
                        <option value="amex">American Express</option>
                    </select>
                    <?=isset($form->elements['creditCardType']->errors[0])? "<span class='form_error'>".$form->elements['creditCardType']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-acct" value="<?=isset($form->elements['acct']->value)?$form->elements['acct']->value:''?>" name="payment[acct]"/>
                    <?=isset($form->elements['acct']->errors[0])? "<span class='form_error'>".$form->elements['acct']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-firstName" value="<?=isset($form->elements['firstName']->value)?$form->elements['firstName']->value:''?>" name="payment[firstName]"/>
                    <?=isset($form->elements['firstName']->errors[0])? "<span class='form_error'>".$form->elements['firstName']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-lastName" value="<?=isset($form->elements['lastName']->value)?$form->elements['lastName']->value:''?>" name="payment[lastName]"/>
                    <?=isset($form->elements['lastName']->errors[0])? "<span class='form_error'>".$form->elements['lastName']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-expMonth" value="<?=isset($form->elements['expMonth']->value)?$form->elements['expMonth']->value:''?>" name="payment[expMonth]"/>
                    <?=isset($form->elements['expMonth']->errors[0])? "<span class='form_error'>".$form->elements['expMonth']->errors['0'] ."</span>" :''?>
                </div>


               <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-expYear" value="<?=isset($form->elements['expYear']->value)?$form->elements['expYear']->value:''?>" name="payment[expYear]"/>
                    <?=isset($form->elements['expYear']->errors[0])? "<span class='form_error'>".$form->elements['expYear']->errors['0'] ."</span>" :''?>
               </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-cvv2" value="<?=isset($form->elements['cvv2']->value)?$form->elements['cvv2']->value:''?>" name="payment[cvv2]"/>
                    <?=isset($form->elements['cvv2']->errors[0])? "<span class='form_error'>".$form->elements['cvv2']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textarea">
                    <textarea  rows="10" cols="25" id="payment-street" name="payment[street]"><?=isset($form->elements['street']->value)?$form->elements['street']->value:''?></textarea>
                </div>
               <?=isset($form->elements['street']->errors[0])? "<span class='form_error_textarea'>".$form->elements['street']->errors['0'] ."</span>" :''?>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" type="text" id="payment-city" value="<?=isset($form->elements['city']->value)?$form->elements['city']->value:''?>" name="payment[city]"/>
                    <?=isset($form->elements['city']->errors[0])? "<span class='form_error'>".$form->elements['city']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <select class="contact_input_text" id="payment-state" name="payment[state]">
                        <option value="AL">Alabama</option>
                        <option value="AK">Alaska</option>
                        <option value="AS">American Samoa</option>
                        <option value="AZ">Arizona</option>
                        <option value="AR">Arkansas</option>
                        <option selected="selected" value="CA">California</option>
                        <option value="CO">Colorado</option>
                        <option value="CT">Connecticut</option>
                        <option value="DE">Delaware</option>
                        <option value="DC">District of Columbia</option>
                        <option value="FM">Federated States of Micronesia</option>
                        <option value="FL">Florida</option>
                        <option value="GA">Georgia</option>
                        <option value="GU">Guam</option>
                        <option value="HI">Hawaii</option>
                        <option value="ID">Idaho</option>
                        <option value="IL">Illinois</option>
                        <option value="IN">Indiana</option>
                        <option value="IA">Iowa</option>
                        <option value="KS">Kansas</option>
                        <option value="KY">Kentucky</option>
                        <option value="LA">Louisiana</option>
                        <option value="ME">Maine</option>
                        <option value="MH">Marshall Islands</option>
                        <option value="MD">Maryland</option>
                        <option value="MA">Massachusetts</option>
                        <option value="MI">Michigan</option>
                        <option value="MN">Minnesota</option>
                        <option value="MS">Mississippi</option>
                        <option value="MO">Missouri</option>
                        <option value="MT">Montana</option>
                        <option value="NE">Nebraska</option>
                        <option value="NV">Nevada</option>
                        <option value="NH">New Hampshire</option>
                        <option value="NJ">New Jersey</option>
                        <option value="NM">New Mexico</option>
                        <option value="NY">New York</option>
                        <option value="NC">North Carolina</option>
                        <option value="ND">North Dakota</option>
                        <option value="MP">Northern Mariana Islands</option>
                        <option value="OH">Ohio</option>
                        <option value="OK">Oklahoma</option>
                        <option value="OR">Oregon</option>
                        <option value="PW">Palau</option>
                        <option value="PA">Pennsylvania</option>
                        <option value="PR">Puerto Rico</option>
                        <option value="RI">Rhode Island</option>
                        <option value="SC">South Carolina</option>
                        <option value="SD">South Dakota</option>
                        <option value="TN">Tennessee</option>
                        <option value="TX">Texas</option>
                        <option value="UT">Utah</option>
                        <option value="VT">Vermont</option>
                        <option value="VI">Virgin Islands</option>
                        <option value="VA">Virginia</option>
                        <option value="WA">Washington</option>
                        <option value="WV">West Virginia</option>
                        <option value="WI">Wisconsin</option>
                        <option value="WY">Wyoming</option>
                    </select>
                    <?=isset($form->elements['state']->errors[0])? "<span class='form_error'>".$form->elements['state']->errors['0'] ."</span>" :''?>
                </div>


                <div class="creditcard_textbox">
                    <input class="creditcard_input_text" id="payment-zip" type="text" value="<?=isset($form->elements['zip']->value)?$form->elements['zip']->value:''?>" name="payment[zip]"/><br/>
                    <?=isset($form->elements['zip']->errors[0])? "<span class='form_error'>".$form->elements['zip']->errors['0'] ."</span>" :''?>
                </div>

           </div>
        </div>

        <div style="clear: both"></div>
        <div class="creditcard_bottom">
           <input class="submit" id="payment-submit" type="submit" name="payment[submit]" value="Pay now"/>
        </div>
        <div class="order_back">
                <a href="/commerce/checkout/">&larr;back to order review</a>
        </div>
        <div style="clear: both"></div>


</form>
